1) Sends the task to the computer's file system.
2) Waits while the file system opens and reads the file.
3)Returns the content to the client.
4)Ready to handle the next request.
1) Node.js can create, open, read, write, delete, and close files on the server
2)Node.js can generate dynamic page content.
3) Node.js can collect form data
4) Node.js can add, delete, modify data in your database
5) IT is fun and easy to learn!
6)Node.js files contain tasks that will be executed on certain events.
Node.js files must be initiated in the "Command Line Interface" program of your computer.
How to open the command line interface on your computer depends on the operating system. For Windows users, press the start button and look for "Command Prompt", or simply write "cmd" in the search field.
Navigate to the folder that contains the file "myfirst.js", the command line interface window should look something like this:
Use the module "myfirstmodule" in a Node.js file: var http = require('http'); var dt = require('./ myfirst module'); http.createServer (function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.write("The date and time are currently: " + dt.myDateTime()); res.end(); }).listen(8080); NPM is a package manager for Node.js packages, or modules if you like. www.npmjs.com hosts thousands of free packages to download and use. The NPM program is installed on your computer when you install Node.js